// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import BackBtn from '@/components/BackBtn/index.js'
import LodingProgress from '@/components/LodingProgress/index.js'
import Snackbar from '@/components/Snackbar/index.js'
import {openNewUrl, getAppVersion,getStatusBarHeight,getAdaptiveSize,makingCalls} from "@/utils/app";
import { parseTime} from "@/utils/ruoyi";

import '@/assets/style/base.css'
import Vant from 'vant';
import 'vant/lib/index.css'
import VueClipboard from 'vue-clipboard2'
import 'lib-flexible'
import less from 'less'
Vue.use(Vant);
Vue.use(LodingProgress);
Vue.use(Snackbar);
Vue.use(BackBtn);
Vue.use(VueClipboard)
Vue.use(less)
Vue.prototype.parseTime = parseTime
Vue.prototype.openNewUrl = openNewUrl
Vue.prototype.getAppVersion = getAppVersion
Vue.prototype.getAdaptiveSize = getAdaptiveSize
Vue.prototype.getStatusBarHeight = getStatusBarHeight
Vue.prototype.makingCalls = makingCalls
const globalConfig = {
  platform: 'web' // 全局配置项，标记项目运行平台，默认web
}
const userAgent = navigator.userAgent.toLowerCase();
const isWeixin = userAgent.indexOf('micromessenger') != -1;
if (isWeixin) {
  globalConfig.platform = 'weixin'; // 如果是微信浏览器平台改为weixin
}
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
})
